package cn.gwm.flink.streaming.dwm.charge.template;

import cn.gwm.flink.streaming.constant.BaseFields;
import cn.gwm.flink.streaming.dwm.charge.bean.ChargeArgs;

/**
 * @ClassName OtherChargeState
 * @Description 其他充电状态
 * @Author LiangGuang
 * @Date 2023/05/11 17:24
 */
public class OtherChargeState extends ChargeStateModel {

    @Override
    protected void stateStartSelfHandle(ChargeArgs args) throws Exception {
        // 记录中断开始时间
        Long breakTime = args.getChargeBreakState().value();
        if (breakTime == null) {
            args.getChargeBreakState().update(args.getFirstData().getLong(BaseFields.tid));
        }
    }

    @Override
    protected void stateEndSelfHandle(ChargeArgs args) {

    }
}
